//
//  YTGuildeView.m
//  yitaicaijing
//
//  Created by DIANGHONG on 2018/9/14.
//  Copyright © 2018年 DIANGHONG. All rights reserved.
//

#import "YTGuildeView.h"
#define kTabbarHeight (KIsiPhoneX ? 83 : 44)
@interface YTGuildeView ()
@property(nonatomic ,strong)UIImageView *imageView;
@end
@implementation YTGuildeView

- (UIImageView *)imageView
{
    if (!_imageView) {
        
        UIImage *image = [UIImage imageNamed:@"8521536911766_.pic_hd"];
        CGSize imageSize = image.size;
        _imageView = [[UIImageView alloc] initWithImage:image];
        _imageView.frame = CGRectMake(kScreenWidth - imageSize.width - 18
                                      , kScreenHeight - kTabbarHeight - imageSize.height  - 10
                                      , imageSize.width, imageSize.height);
        [_imageView sizeToFit];
        
    }
    return _imageView;
}

- (void)layoutSubviews
{
    
    [super layoutSubviews];
    [self addSubview:self.imageView];
    
    self.backgroundColor = [[UIColor blackColor] colorWithAlphaComponent:0.5];
}


- (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event
{
    [self removeFromSuperview];
}

@end
